home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / boot / StartupManager.lha / StartupManager10 / Install < prev    next >
Text File  |  1995-02-01  |  5KB  |  202 lines

  1. ; $VER: Install 1.0 (30.01.95)
  2. ; Script to install Release 1 StartupManager
  3. (complete 0)
  4.  
  5. (set @default-dest "SYS:WBStartup")
  6. (set @startupdir "SYS:Startup")
  7.  
  8. (set target @default-dest)
  9.  
  10. ;********************************************************************
  11.  
  12. (set #Yes-text
  13. (cat "Yes"
  14. ))
  15.  
  16. (set #No-text
  17. (cat "No"
  18. ))
  19.  
  20.  
  21. (set #Overwrite
  22. (cat "Replace"
  23. ))
  24.  
  25. (set #Abort
  26. (cat "Abort"
  27. ))
  28.  
  29. (set #Proceed
  30. (cat     "Proceed"
  31. ))
  32.  
  33. (set #Skip-This-Part
  34. (cat     "Skip this part"
  35. ))
  36.  
  37. ;********************************************************************
  38.  
  39. (set #warn-kickstart-text
  40. (cat    "\nBAD VERSION OF KICKSTART\n\n"
  41.     "StartupManager requires KickStart 2.0 (V37) or higher. It will not work on earlier versions.\n"
  42.     "You currently are running KickStart V%ld.\n\n"
  43.     "Continue with installation?"
  44. ))
  45.  
  46. ;********************************************************************
  47.  
  48. (set #docs-install-text
  49. (cat "Installing documentation"
  50. ))
  51.  
  52. (set #docs-query-text
  53. (cat "\nWould you like to install documentation for StartupManager?"
  54. ))
  55.  
  56. (set #docs-help-text
  57. (cat ""
  58. ))
  59.  
  60. (set #docs-query-dir-text
  61. (cat "Where to install documentation?"
  62. ))
  63.  
  64. (set #docs-query-dir-help
  65. (cat @askdir-help
  66. ))
  67.  
  68. ;********************************************************************
  69.  
  70. (set #MainQuery-text
  71. (cat "\nStartupManager Installer\n\n"
  72.      "Startup Manager is about to be copied into your SYS:WBStartup directory. The programs "
  73.      "currently in this directory will be moved to a directory called SYS:Startup. "
  74.      "Startup manager will load and run the programs in this directory just as if "
  75.      "they had been run from workbench."
  76. ))
  77.  
  78. (set #MainQuery-help
  79. (cat ""
  80. ))
  81. (set #Main-abort-text
  82. (cat "Startup manager has not been installed!"
  83. ))
  84.  
  85. (set #Overwrite-text
  86. (cat "\nThere is a version of StartupManager installed already. "
  87.      "Would you like to replace it with this version?"
  88. ))
  89.  
  90. (set #Overwrite-abort-text
  91. (cat "Installation has been aborted, old version remains untouched."
  92. ))
  93.  
  94. (set #MovingFiles
  95. (cat "\n\nMoving files from SYS:WBStartup to SYS:Startup..."
  96. ))
  97.  
  98. ;********************************************************************
  99.  
  100. (set #WBHandler-text
  101. (cat "\nInstalling WBStart-Handler\n\nCopyright ©1991-93 Stefan Becker"
  102. ))
  103.  
  104. (set #WBHandler-help
  105. (cat  "This will copy WBStart-Handler into your L: directory.\nCopyright ©1991-93 Stefan Becker\n\n"
  106.      @copylib-help
  107. ))
  108.  
  109. ;********************************************************************
  110.  
  111. (set #MatrixLib-text
  112. (cat "\nInstalling matrix.library\n\nCopyright ©1992-95 David Swasbrook"
  113. ))
  114.  
  115. (set #MatrixLib-help
  116. (cat "This will copy matrix.library into your LIBS: directory.\nCopyright ©1992-95 David Swasbrook\n\n"
  117.      @copylib-help
  118. ))
  119.  
  120.  
  121. ;********************************************************************
  122.  
  123. (set #goodbye
  124. (cat "\nStartup manager has been installed, it will be used the next time "
  125.      "you boot your system.\n\nI hope you like it."
  126. ))
  127.  
  128. ;********************************************************************
  129.  
  130. ;********************************************************************
  131. ;**** END OF TEXT
  132. ;********************************************************************
  133.  
  134.  
  135. ;********************************
  136. ;**** CHECK THE KICKSTART VERSION
  137. ;****
  138. (set ver (/ (getversion) 65536) )
  139. (if (< ver 37) (
  140.     (set warning (#warn-kickstart-text ver) ) (message warning)
  141. ))
  142.  
  143. (complete 10)
  144.  
  145. (if (exists "SYS:WBStartup/StartupManager")
  146. (
  147.     (if(askbool (prompt #Overwrite-text) (help #Overwrite-text) (choices #Overwrite #Abort)  )
  148.     (
  149.         (copyfiles (source "StartupManager") (dest "SYS:WBStartup") )
  150.     )
  151.     (
  152.         (abort #Overwrite-abort-text )
  153.     ))
  154. )
  155. (
  156.     (if(askbool (prompt #MainQuery-text) (help #MainQuery-text) )
  157.     (
  158.         (makedir (infos) "SYS:Startup" )
  159.         (complete 20)
  160.         (set warning (#MovingFiles) ) (working warning)
  161.         (run "Copy SYS:WBStartup/#? SYS:Startup/" (help "") (prompt ""))
  162.         (complete 40)
  163.         (run "Delete SYS:WBStartup/#?" (help "") (prompt ""))
  164.         (complete 50)
  165.         (copyfiles (source "StartupManager") (dest "SYS:WBStartup") (infos) )
  166.         (complete 60)
  167.         (tooltype    (dest "SYS:WBStartup/StartupManager")
  168.             (settooltype "PATHS" "\"SYS:Startup/\"" )
  169.             (settooltype "PATHPRI" "NO" )
  170.             (settooltype "DONOTWAIT" )
  171.         )
  172.         (complete 65)
  173.     )
  174.     (
  175.         (abort #Main-abort-text )
  176.     ))
  177. ))
  178.  
  179. (complete 70)
  180.  
  181. (copylib (prompt #WBHandler-text) (help #WBHandler-help) (source "WBStart-Handler") (dest "L:") (confirm) )
  182.  
  183. (complete 75)
  184.  
  185. (copylib (prompt #MatrixLib-text) (help #MatrixLib-help) (source "matrix.library") (dest "LIBS:") (confirm) )
  186.  
  187. (complete 80)
  188.  
  189. (complete 65) (working #docs-install-text)
  190.  
  191. (if(= (askbool (prompt #docs-query-text) (help #docs-query-help)) 1)
  192.     (
  193.         (set docs-target (askdir (prompt #docs-query-dir-text) (help #docs-query-dir-help) (default "SYS:")))
  194.         (copyfiles (source "StartupManager.guide") (dest docs-target ) (infos) )
  195.     )
  196. )
  197.  
  198. (message #goodbye)
  199.  
  200.  
  201. (complete 100)
  202.